/**
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.xkx.simple.rpc.server;

import com.xkx.simple.rpc.findstudent.FindStudent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author xkx
 * Date: 2021/7/20
 */
public class FindStudentServiceImpl implements FindStudent {
    private static final Logger logger = LoggerFactory.getLogger(FindStudentServiceImpl.class);
    @Override
    public String find(String name) {
        logger.info("HelloServiceImpl收到: {}.", name);
        String ret;
//        输入你的真实学号，返回你的真实姓名
//        输入学号 20210000000000，返回 null
//        输入学号 20210123456789，返回心心
        if(name.equals("20210123456789")){
            ret = "心心";
        }else if(name.equals("G20200343030516")){
            ret = "许凯旋";
        } else{
            ret = null;
        }
        logger.info("HelloServiceImpl返回: {}.", ret);
        return ret;
    }
}
